package com.hdax.service;

import com.hdax.entity.Permission;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hdax.vo.PermissionVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限表 服务类
 * </p>
 *
 * @author ${author}
 * @since 2021-03-22
 */
public interface PermissionService extends IService<Permission> {
    List<PermissionVo> selectAllPermission(Integer roleId);
    void deleteByRid(@Param("roleId") Integer roleId);
    int addPermission(@Param("roleId")Integer roleId,@Param("permissions") List<Integer> permissions);
    List<Permission> selectPermission();
    int addPermission(Permission permission);
    int updatePermission(Permission permission);
    Permission selectById(Integer id);
    int selectCountById(Integer id);
    int deletePermission(Integer id);
    List<Permission> findParentByRoleId(Integer roleId);
    List<Permission> findChildrenByRoleId(Integer parent,Integer roleId);

}
